import React, { memo, useEffect, useMemo, useState } from "react";
import {
  checkLink,
  resetECS,
  getVersion,
  testModel
} from '@/api/common.api'


let timer
function IndicatorLight(props) {
  const size = 26


  const color = useMemo(() => {
    return  props.state ? "#2ecc71" : "#e74c3c";
  }, [props])


  return (
    <span
      style={{
        display: "inline-block",
        width: size,
        height: size,
        borderRadius: "50%",
        backgroundColor: color,
        boxShadow: `0 0 6px ${color}`,
      }}
    ></span>
  );
};

export default memo(IndicatorLight);
